Skip to content

Add Weather: now, the next hours and the week - #33

Draft
freethinkel wants to merge 14 commits into
mainfrom
weather-app
Draft

freethinkel wants to merge 14 commits into
mainfrom
weather-app

Conversation

@freethinkel

@freethinkel freethinkel commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

A Weather app on FMC Companion's location and weather, built from stock LVGL parts and stock fonts. Uses the crate's hourly record (#32); the phone side is fmctools/companion#14.

  • Menu app: three pages in the stock vertical pager. Now (place, temperature in 48M, condition, high and low, wind and humidity), Hours (the next 12, with the chance of rain or snow from 30 %), Days (the week, each day with a range bar coloured by its temperature).
  • Page next to the face: the Now screen alone. Widget card: the place, the temperature with the condition, high and low.
  • LVGL here has no images, so each condition icon is two to four rounded objects (a disc for the sun, a pill and a bump for a cloud, short pills for rain, a black disc as the moon's bite). 169 objects at most with all pages full; the limit is 192.
  • The last answer is kept in storage and moves with the clock: hours that passed and yesterday drop out, and "Updated 3 h ago" shows once it is older than the phone's own cache.
  • An older companion: Android answers BAD_REQUEST to the hours, so the app asks once more without them; iOS answers without them. Either way the Hours page says "Update FMC Companion for the hourly forecast" and the rest works.

What ran

  • make test APP=weather: 25 host tests. The model (answers in any order, the cache, midnight wrap, -0, bars that stay in their track, a blob from another version) and the screens (every batch through the loader's validator for every icon and the full, short and empty pages; leaving frees every handle).
  • make build APP=weather && make check: 54 KB package, ok.

The emulator

Ran with a fake phone answering location and weather over K (runs/weather-shots/shots.py, the calendar's script adapted): the permission message, the three pages, scrolling, the page next to the face, the widget card. Screenshots are in apps/weather/shots/.

It found two things the host tests had not:

  • The stock fonts have no °: it drew as a blank. The text has no degree sign now, and the Now screen draws a ring after the temperature.
  • With a mixed forecast the pager stayed black. A day's row and the top of the Now screen wrote more records than the room asked for before them, so the batch filled up mid-view. The tests built only uniform forecasts, which happened to fit; they now build every view from every fill level of the batch.

Still draft: not on a real watch, not with the real companion.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CQSU8Mpie8VxG5uXTwzf2a

freethinkel and others added 12 commits November 20, 2026 14:13
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQSU8Mpie8VxG5uXTwzf2a
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQSU8Mpie8VxG5uXTwzf2a
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQSU8Mpie8VxG5uXTwzf2a
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQSU8Mpie8VxG5uXTwzf2a
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQSU8Mpie8VxG5uXTwzf2a
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQSU8Mpie8VxG5uXTwzf2a
The watch's clock at the moment the answer came can be on the other side
of an hour or of midnight from the phone's: then "Now" sat one hour off
and "Today" on yesterday until the next answer, and in the cache.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQSU8Mpie8VxG5uXTwzf2a
…w screen centred

The emulator showed the stock fonts have no degree glyph: it drew as a
blank a letter wide, on the screens and on the widget card.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQSU8Mpie8VxG5uXTwzf2a
A day's row and the top of the now screen wrote more records than the room
asked for before them, so with some forecasts the batch filled up mid-view
and the pager stayed hidden. The emulator showed it; the tests built only
uniform forecasts, which happened to fit. They now build every view from
every fill level of the batch.

A failed draw also left its records in the batch, failing every later one.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQSU8Mpie8VxG5uXTwzf2a
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQSU8Mpie8VxG5uXTwzf2a
@freethinkel
freethinkel changed the base branch from weather-hours to main November 20, 2026 20:36
freethinkel and others added 2 commits November 21, 2026 15:31
The crown stays with the pager, which scrolls a page first and pages at its end;
the bar shows while its page scrolls and hides a second later, as in stock lists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQSU8Lx87AsgWNq9fwhXi1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant